home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / utilit~1 / gdb35src.zoo / dist-gdb / munch < prev    next >
Encoding:
Text File  |  1993-03-03  |  491 b   |  18 lines

  1. #! /bin/sh
  2.  
  3. # create an initialization procedure from a list of .o files
  4.  
  5. echo '/* Do not modify this file.  It is created automatically by "munch". */'
  6. echo 'void initialize_all_files () {'
  7.  
  8. if test "$1" = "-DSYSV" ; then
  9.     shift;
  10.     gcc-nm $* | grep -e '^(.*[^a-zA-Z_]_|_)initialize_' | \
  11.     sed -e 's/^.*\(_initialize_[a-zA-Z0-9_]*\)[^a-zA-Z0-9_].*$/   \1 ();/'
  12. else
  13.     gcc-nm -p $* | grep -e 'T *__initialize_' | \
  14.     sed -e 's/^.*T *_*\(.*\)/    _\1 ();/'
  15. fi
  16.  
  17. echo '}'
  18.